﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" CodeBehind="grafico.aspx.cs"
    Inherits="sistemaAcademicoFinanceiroEscolas.grafico" %>

<%@ Register Src="~/DynamicData/Content/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="asp" %>
<%@ Register Src="~/DynamicData/Content/FilterUserControl.ascx" TagName="DynamicFilter"
    TagPrefix="asp" %>
<%@ Register Assembly="Catalyst.Web.DynamicData" Namespace="Catalyst.Web.DynamicData"
    TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:DynamicDataManager ID="DynamicDataManager1" runat="server" AutoLoadForeignKeys="true" />
    <asp:ScriptManagerProxy runat="server" ID="ScriptManagerProxy1" />
    <link rel="stylesheet" type="text/css" media="screen" href="css/estilos.css" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <fieldset style="border-bottom-color: #ffffff; border-bottom-style: none; border-bottom-width: 0px;
                border-color: #ffffff; border-style: none;">
                <html>
                <head>

                    <script type="text/javascript" src="https://www.google.com/jsapi"></script>

                    <script type="text/javascript">
                                google.load("visualization", "1", { packages: ["corechart"] });
                                google.setOnLoadCallback(drawChart);
                                function drawChart() {
                                
                                
                                
                                    var data = google.visualization.arrayToDataTable([
                                  ['Mês', 'Inadiplentes', 'Não inadiplentes'],
                                  ['Janeiro', 1000, 400],
                                  ['Fevereiro', 170, 460],
                                  ['Março', 660, 1120],
                                  ['Abril', 260, 1020],
                                  ['Maio', 1170, 460],
                                  ['Junho', 660, 1120],
                                  ['Julho', 560, 320],
                                  ['Agosto', 1170, 460],
                                  ['Setembro', 600, 1620],
                                  ['Outubro', 260, 1020],
                                  ['Novembro', 1110, 400],
                                  ['Dezembro', 900, 540]
                                ]);

                                    var options = {
                                        title: 'Relatório de inadiplência',
                                        hAxis: { title: 'Mês', titleTextStyle: { color: 'black'} }
                                    };

                                    var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
                                    chart.draw(data, options);
                                }
                    </script>

                </head>
                <body>
                    <div>
                        <table>
                            <tr>
                                <td class="textoNegro">
                                    Mês inicial:
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstMesInicial" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstMesInicial_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                                <td class="textoNegro">
                                    Mês final:
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstMesFinal" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td class="textoNegro">
                                    Ano inicial:
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstAnoInicial" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstAnoInicial_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                                <td class="textoNegro">
                                    Ano final:
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstAnoFinal" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstAnoFinal_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="textoNegro">
                                    Serie:
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstSerie" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstSerie_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                                <td class="textoNegro">
                                    Turma:
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstTurma" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstTurma_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                                <td class="textoNegro">
                                    Aluno:
                                </td>
                                <td>
                                    <asp:DropDownList ID="lstAluno" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Button ID="btnGerar" runat="server" Text="Gerar relatório" OnClick="btnGerar_Click" />
                                </td>
                            </tr>
                        </table>
                        <div id="chart_div" style="width: 1224px; height: 600px; padding-left: -100px;">
                            <asp:Panel ID="Panel1" runat="server">
                            </asp:Panel>
                        </div>
                    </div>
                </body>
                </html>
            </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
